package com.myspace.controller.account;

import com.alibaba.fastjson2.JSONObject;
import com.myspace.pojo.User;
import com.myspace.service.space.account.GetUserListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class GetUserListController {
    @Autowired
    private GetUserListService getUserListService;

    @GetMapping("/myspace/userlist/")
    public JSONObject getUserList(@RequestParam Map<String, String> data) {
        Integer page = Integer.parseInt(data.get("page"));
        return getUserListService.getUserList(page);
    }
}
